﻿namespace Digitalmes.WebApi.ViewModels;

/// <summary>
/// 路由ViewModel。
/// </summary>
public sealed class RouteViewModel
{
    public string? Path { get; set; }

    public string? Name { get; set; }

    public string? Redirect { get; set; }

    public string? Component { get; set; }

    public RouteMetaViewModel? Meta { get; set; }

    public List<RouteViewModel>? Children { get; set; }
}

/// <summary>
/// 路由元数据ViewModel。
/// </summary>
public sealed class RouteMetaViewModel
{
    public int? Rank { get; set; }

    public string? Title { get; set; }

    public string? Icon { get; set; }

    public string? ExtraIcon { get; set; }

    public bool ShowLink { get; set; }

    public bool ShowParent { get; set; }

    public string[]? Roles { get; set; }

    public string[]? Auths { get; set; }

    public bool KeepAlive { get; set; }

    public string? FrameSrc { get; set; }

    public bool FrameLoading { get; set; }

    /// <summary>
    /// 页面加载动画
    /// </summary>
    public RouteTransitionViewModel? Transition { get; set; }

    public bool HiddenTag { get; set; }

    public string? ActivePath { get; set; }
}

public sealed class RouteTransitionViewModel
{
    public string? Name { get; set; }

    public string? EnterTransition { get; set; }

    public string? LeaveTransition { get; set; }
}
